//
//  DeviceListCell.h
//  OST
//
//  Created by mac on 13-7-6.
//  Copyright (c) 2013年 mac. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "PersistableInfo.h"
@class DeviceListCell;
@protocol DeviceListCellDelegate <NSObject>

@optional
-(void)changeCameraInfo:(NSDictionary *)data cell:(DeviceListCell*)cell;
-(void)changeRemoteInfo:(NSDictionary *)data cell:(DeviceListCell *)cell;

@end

@interface DeviceListCell : UITableViewCell

@property (nonatomic,assign) IBOutlet UILabel *labelName;
@property (nonatomic,assign) IBOutlet UIImageView *icon;
@property (nonatomic,assign) IBOutlet UIButton *btn_refresh;


@property (nonatomic,assign) IBOutlet UIButton *btn_arm;
@property (nonatomic,assign) IBOutlet UIButton *btn_ds_arm;

@property (nonatomic,assign) id<DeviceListCellDelegate>delegate;


-(void)loadArmData;
-(void)initView;

- (IBAction)changeInfo:(id)sender;
- (IBAction)changeRemoteInfo:(id)sender;
+(PersistableInfo *)getCameraInfo:(NSDictionary *)cdata;
+(PersistableInfo *)getRemoteInfo:(NSDictionary *)Rdata;
-(void)setCameraCellData:(NSDictionary *)theData;
-(void)setRemoteCellData:(NSDictionary *)theData;
-(void)updateIcon;
-(void)updateRemoteIcon;
@property (weak, nonatomic) IBOutlet UIButton *changeBtn;
@property (nonatomic, strong) NSDictionary *cameraData;
@property (nonatomic, strong) NSDictionary *remoteData;
@property (nonatomic, strong) NSString *ipUrl;
@property (weak, nonatomic) IBOutlet UIButton *remoteChnageBtn;

@end
